<?php


phpinfo();
header("content-type:text/html;charset=utf8");
  $id = $_GET['id'];
$dsn = "mysql:host=localhost;dbname=demo;charset=utf8";

$pdo = new PDO($dsn,'root','root');

$sql = "DELETE FROM book WHERE id = '$id'";

$res = $pdo->exec($sql);
if($res){
	echo "<script>alert('删除成功');</script>";
}

?>